package cn.sinata.wanglin.neighbor.activity;

import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;

import com.xilada.xldutils.activitys.TitleActivity;

import butterknife.BindView;
import cn.sinata.wanglin.R;

public class AddTagActivity extends TitleActivity {

    @BindView(R.id.et_content)
    EditText et_content;

    @Override
    protected int setContentId() {
        return R.layout.activity_add_tag;
    }

    @Override
    protected void initView() {
        super.initView();
        setTitle("添加标签");
        addRightButton("确定", new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String tag = et_content.getText().toString().trim();
                if (TextUtils.isEmpty(tag)) {
                    showToast("标签不能为空");
                    return;
                }
                Intent intent = new Intent();
                intent.putExtra("tag",tag);
                setResult(RESULT_OK,intent);
                finish();
            }
        });
    }


}
